An Operating System (OS) is a software program that controls physical computer hardware (e.g., a processor, memory, and disk and CD-ROM drives) and presents application programs with a unified set of abstract services (e.g., a file system). A Virtual Machine Manager (VMM) is also a software program that controls physical computer hardware such as, for example, the processor, memory, and disk drives. Unlike an OS, a VMM presents programs executing within a Virtual Machine (VM) with the illusion that they are executing on real physical computer hardware that includes, for example, a processor, memory and a disk drive.
Each VM typically functions as a self-contained entity, such that software executing in a VM executes as if it were running alone on a “bare” machine instead of within a virtual machine that shares a processor and other physical hardware with other VMs. It is the VMM that emulates certain functions of a “bare” machine so that software executing within a VM executes as if it were the sole entity executing on the computer.
Various techniques have been developed to assign physical system memory to virtual machines running on a system. One such technique is the use of partitioned memory. Partitioned memory is where physical system memory is divided into a number of contiguous regions. While partitioned memory is less expensive to implement in the CPU, memory cannot be easily reconfigured dynamically between virtual machines.
Also various techniques have been developed to obtain greater performance from a given memory capacity. One such technique is the use of virtual memory. Virtual memory is based on the concept that, when running a program, the entire program need not be loaded into main memory at one time. Instead, the computer's operating system loads sections of the program into main memory from a secondary storage device (e.g., a hard disk drive) as needed for execution.
To make this scheme viable, the operating system maintains tables, which keep track of where each section of the program resides in main memory and secondary storage. As a result of executing a program in this way, the program's logical addresses no longer correspond to physical addresses in main memory. To handle this situation a central processing unit (CPU) maps the program's effective or virtual addresses into their corresponding physical addresses.
However, in computer systems implementing the partitioned memory technique, it is often desirable to dynamically reallocate memory for each virtual machine. It is also desirable to manage memory on an individual page basis, rather than in large regions. With current partitioned memory systems, it is not possible to dynamically reallocate memory. Current partitioned memory systems also impose many limitations on the page level flexibility that many operating systems require to support virtual memory.